﻿<Page x:Class="SlotDuino.UI.Pages.Dashboard"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      Background="{x:Null}"
      Title="Dashboard" Loaded="Page_Loaded">
    
    <Grid>
        <!-- @TODO: Uncommend and add this functionality
		<GroupBox Header="Informações" Height="50" VerticalAlignment="Top">
			<TextBlock Margin="3" x:Name="txtInfo"><Run Language="pt-br" Text="Neste módulo você pode gerenciar o cadastro dos pilotos"/></TextBlock>
		</GroupBox>
        //-->
        <!-- Margin="0,60,0,0" -->
        <UniformGrid Columns="2" MinHeight="460">
			<GroupBox Header="Cadastros" Margin="0, 0, 5, 5">
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="0.5*"/>
						<ColumnDefinition Width="0.5*"/>
					</Grid.ColumnDefinitions>
					<Button Content="Pilotos" Height="55" VerticalAlignment="Center" HorizontalAlignment="Center" Width="150" Grid.Column="0" x:Name="btnPilots" Click="btnPilots_Click" TabIndex="1" Margin="5,0" />
					<Button Content="Operadores"  Grid.Column="1" Height="55" Width="150" x:Name="btnOperators" Click="btnOperators_Click" TabIndex="2" Margin="5,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
				</Grid>
			</GroupBox>
			<GroupBox Header="Relatórios" Margin="5, 0, 0, 5" IsEnabled="True">
				<Grid>
					<Button Content="Rankings" Height="55" Width="150" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="btnRankings" TabIndex="6" Click="btnRankings_Click" />
                </Grid>
			</GroupBox>
			<GroupBox Header="Gerenciamento da Pista" Margin="0, 5, 5, 0">
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="0.5*"/>
						<ColumnDefinition Width="0.5*"/>
					</Grid.ColumnDefinitions>

					<TextBlock Grid.Column="0" Grid.Row="0" Padding="10" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,10,0,0" Name="txtTrackConnectionStatus"><Run Language="pt-br" Text="Pista: ---"/><LineBreak/><Run Language="pt-br" Text="Status: Não conectado"/></TextBlock>
					<Button Content="Conectar" Grid.Column="0" x:Name="btnConnect" TabIndex="3" Click="btnConnect_Click" Height="55" VerticalAlignment="Top" HorizontalAlignment="Center" Width="150" Margin="0,75,0,0" />
                    <Button Content="Desconectar" Grid.Column="0" x:Name="btnDisconnect" TabIndex="3" Height="55" VerticalAlignment="Top" HorizontalAlignment="Center" Width="150" Margin="0,75,0,0" Visibility="Hidden" Click="btnDisconnect_Click" />
					<StackPanel Grid.Column="1" Margin="10">
						<Button Content="Configurar" x:Name="btnTrackConfig" TabIndex="4" Click="btnTrackConfig_Click" HorizontalAlignment="Center" Width="150" Height="55" d:LayoutOverrides="Height" Margin="0,0,0,10" />
						<Button Content="Corridas Livres" Height="55" x:Name="btnFreeRaces" Click="btnFreeRaces_Click" TabIndex="5" HorizontalAlignment="Center" Width="150" Margin="0,0,0,10" />
                        <Button Content="Campeonatos" x:Name="btnChampionships" TabIndex="5" HorizontalAlignment="Center" Width="150" Height="55" Click="btnChampionships_Click" />
					</StackPanel>
				</Grid>
			</GroupBox>
			<GroupBox Header="Sistema" Margin="5, 5, 0, 0">
				<Grid>
					<Button Content="Preferências" Width="150" Height="55" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="btnPreferences" TabIndex="7" Click="btnPreferences_Click" />
                </Grid>
			</GroupBox>
		</UniformGrid>
	</Grid>
</Page>
